package com.example.service.impl;

import com.example.entity.Goods;
import com.example.entity.Gouwuche;
import com.example.mapper.GWCMapper;
import com.example.service.IGouWuChe;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class GouWuChe implements IGouWuChe {

    @Autowired
    private GWCMapper gwcMapper;
    @Override
    public Goods good(Integer id) {
        Goods good =  gwcMapper.findById(id);
        return good;
    }

    @Override
    public int InsertGood(Gouwuche gwc) {
        int i =gwcMapper.insertGood(gwc);
        return i;
    }

    @Override
    public Goods goodName(String goodsName) {
        Goods goods = gwcMapper.findByName(goodsName);
        return goods;
    }


}
